package cn.edu.nuc.bre.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 事务
 * @author 王凯
 *
 */
public class Transaction implements Serializable{
    /**
	 * 序列化id
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 事务id
	 */
	private Integer tid;

	/**
	 * 事务明细id
	 */
    private Integer tdid;

    /**
     * 事务状态
     * 已终止：-2  已回收：-1  
     * 待初审响应：0 待审核：1  
     * 待处理响应：2  待处理：3  
     * 待办结：4  已办结：5
     */
    private Integer tstate;

    /**
     * 事务描述
     */
    private String tdesc;

    /**
     * 电话
     */
    private String tphone;

    /**
     * 上报单位（冗余）
     */
    private String tdeptname;

    /**
     * 事务类型名（冗余）
     */
    private String ttname;

    /**
     * 事务明细名称（冗余）
     */
    private String tdname;

    /**
     * 上报时间
     */
    private Date tsubmittime;

    /**
     * 超时时间
     */
    private Date ttimeout;

    /**
     * 催办次数
     */
    private Integer turge;

    /**
     * 是否提交行长
     */
    private Integer tpresident;

    /**
     * 办结满意度（打分）
     */
    private Integer tsatisfaction;

    /**
     * 满意度描述
     */
    private String tsatisfdesc;

    /**
     * 当前处理部门
     */
    private String currentdept;

    /**
     * 用户id
     */
    private String userid;

    /**
     * 用户名字
     */
    private String username;

    /**
     * 流程实例id
     */
    private String procinstid;

    public Integer getTid() {
        return tid;
    }

    public void setTid(Integer tid) {
        this.tid = tid;
    }

    public Integer getTdid() {
        return tdid;
    }

    public void setTdid(Integer tdid) {
        this.tdid = tdid;
    }

    public Integer getTstate() {
        return tstate;
    }

    public void setTstate(Integer tstate) {
        this.tstate = tstate;
    }

    public String getTdesc() {
        return tdesc;
    }

    public void setTdesc(String tdesc) {
        this.tdesc = tdesc;
    }

    public String getTphone() {
        return tphone;
    }

    public void setTphone(String tphone) {
        this.tphone = tphone;
    }

    public String getTdeptname() {
        return tdeptname;
    }

    public void setTdeptname(String tdeptname) {
        this.tdeptname = tdeptname;
    }

    public String getTtname() {
        return ttname;
    }

    public void setTtname(String ttname) {
        this.ttname = ttname;
    }

    public String getTdname() {
        return tdname;
    }

    public void setTdname(String tdname) {
        this.tdname = tdname;
    }

    public Date getTsubmittime() {
        return tsubmittime;
    }

    public void setTsubmittime(Date tsubmittime) {
        this.tsubmittime = tsubmittime;
    }

    public Date getTtimeout() {
        return ttimeout;
    }

    public void setTtimeout(Date ttimeout) {
        this.ttimeout = ttimeout;
    }

    public Integer getTurge() {
        return turge;
    }

    public void setTurge(Integer turge) {
        this.turge = turge;
    }

    public Integer getTpresident() {
        return tpresident;
    }

    public void setTpresident(Integer tpresident) {
        this.tpresident = tpresident;
    }

    public Integer getTsatisfaction() {
        return tsatisfaction;
    }

    public void setTsatisfaction(Integer tsatisfaction) {
        this.tsatisfaction = tsatisfaction;
    }

    public String getTsatisfdesc() {
        return tsatisfdesc;
    }

    public void setTsatisfdesc(String tsatisfdesc) {
        this.tsatisfdesc = tsatisfdesc;
    }

    public String getCurrentdept() {
        return currentdept;
    }

    public void setCurrentdept(String currentdept) {
        this.currentdept = currentdept;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getProcinstid() {
        return procinstid;
    }

    public void setProcinstid(String procinstid) {
        this.procinstid = procinstid;
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((tdid == null) ? 0 : tdid.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Transaction other = (Transaction) obj;
		if (tdid == null) {
			if (other.tdid != null)
				return false;
		} else if (!tdid.equals(other.tdid))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "事务 [事务id=" + tid 
				+ ", 明细id=" + tdid 
				+ ", 事务状态=" + tstate 
				+ ", 需求描述=" + tdesc 
				+ ", 电话=" + tphone 
				+ ", 上报单位=" + tdeptname 
				+ ", 事务类型名=" + ttname 
				+ ", 事务明细名称=" + tdname 
				+ ", 上报时间=" + tsubmittime 
				+ ", 超时时间=" + ttimeout 
				+ ", 催办次数=" + turge 
				+ ", 是否提交行长=" + tpresident
				+ ", 办结满意度=" + tsatisfaction 
				+ ", 办结满意度描述=" + tsatisfdesc 
				+ ", 当前处理部门=" + currentdept
				+ ", 用户id=" + userid 
				+ ", 用户名字=" + username 
				+ ", 流程实例id=" + procinstid 
				+ "]";
	}
    
    
}